<?php
// +----------------------------------------------------------------------
// | Copyright © Sogu Technologies Co. Ltd 2018-2050 All rights reserved.
// +----------------------------------------------------------------------
// | File name: VerifyImageCode.php
// +----------------------------------------------------------------------
// | Author: liuju
// +----------------------------------------------------------------------
// | Description: 描述文档功能
// +----------------------------------------------------------------------
// | Others: 其他内容的说明
// +----------------------------------------------------------------------
// | History: 修改历史记录列表，每条修改记录应包含修改日期、修改者及修改内容简述
// +----------------------------------------------------------------------
// | 1.Date: 2019-03-09 Author: liuju Modification: 创建
// +----------------------------------------------------------------------

namespace App\Http\Requests\Frontend\V10\Users;


use Illuminate\Foundation\Http\FormRequest;

class VerifyImageCodeRequest  extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'captcha' => 'required|max:4',
            'key' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'captcha.required' => '缺少图形验证码',
            'captcha.max' => '图形验证码最长为4位字符',
            'key' => '缺少图形验证码识别信息',
        ];
    }
}